﻿using System;
using System.Web;
using System.Web.UI.WebControls;
using Business;

namespace ServicesDirectory.UserControl
{
    public partial class ListDirectorate : System.Web.UI.UserControl
    {
        public event EventHandler SetDataDetail6;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                if (SetDataDetail6 != null)
                    SetDataDetail6(sender, e);


        }

        public void Display(Guid orgId)
        {
            var result = DirectorateBusiness.Instance.GetAll(orgId, false);
            Repeater1.DataSource = result;
            Repeater1.DataBind();
        }

        #region Function
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "Edit")
            {
                Session["directorateid"] = e.CommandArgument.ToString();
                Response.Redirect("DetailDirectorate.aspx");
            }
        }

        protected void BtnCreate_Click(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        protected void CmdFisrt_Click1(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        protected void CmdBack_Click1(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        protected void CmdNext_Click1(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        protected void CmdLast_Click1(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }
        #endregion
    }
}